package com.wangdao.wechatmall.controller.admin;

import com.wangdao.wechatmall.bean.vo.admin.BaseRespVo;
import com.wangdao.wechatmall.bean.vo.admin.RegionVO;
import com.wangdao.wechatmall.service.admin.RegionService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @author liyongqiang
 * CreateDate 2021/7/8 20:59
 */

@RestController
@RequestMapping("admin/region")
public class RegionController {

    @Autowired
    RegionService regionService;

    @RequestMapping("list")
    public BaseRespVo getList(){
        List<RegionVO> regionVOList= (List<RegionVO>) regionService.getList();
        return BaseRespVo.ok(regionVOList);
    }


}
